
[m,n]=size(xbin);
x2=ones(m,n);
for i=1:m
    con=length(find(xbin(i,:)==0));
    if con ~= 0
        for j=1:con
            x2(i,j)=0;
        end
    end
end
figure;
imshow(x2);